package cn.gok.server.service.impl;

import cn.gok.common.dao.order.OrderDetailDao;
import cn.gok.common.entity.order.OrderDetail;
import cn.gok.server.service.OrderDetailService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: DxlinY
 * @apiNote:
 * @date: 2020/11/6
 * @time: 15:42
 */
@Service
@Slf4j
public class OrderDetailServiceImpl implements OrderDetailService {

    @Autowired
    private OrderDetailDao orderDetailDao;

    @Override
    public PageInfo pageInfo(Object target) {
        QueryWrapper <OrderDetail> wrapper = new QueryWrapper <>();
        wrapper.setEntity((OrderDetail) target);
        return new PageInfo(orderDetailDao.selectList(wrapper));
    }
}
